package com.shuiyun.log.controller;

import cn.hutool.core.bean.BeanUtil;
import com.shuiyun.log.dao.UserDAO;
import com.shuiyun.log.po.UserPO;
import com.shuiyun.log.service.UserService;
import com.shuiyun.log.vo.UserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: LogDemo
 * @description: 用户控制类
 * @author: gujun
 * @create: 2019-10-12 17:12
 **/
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping
    public String add(@RequestBody UserVO userVO){
        userService.save(userVO);
        return "新增成功";
    }
}
